

import java.io.Serializable;

public class TypedBroker  implements Serializable
{
    private int id;
   private String _stockCode;
   private int _clientID;
   private boolean _recommend;
   private float _price;
   
   public TypedBroker()
   {
      _stockCode = "";
      _clientID = 0;
      _recommend = true;
      _price = 0;
   }
   
   public TypedBroker(int ID, String stockCode, int clientID, boolean recommend, float price)
   {
       id = ID;
      _stockCode = stockCode;
      _clientID = clientID;
      _recommend = recommend;
      _price = price;
   }

   public void setStockCode(String stockCode)
   {
      _stockCode = stockCode;
   }
   
   public void setClientID(int clientID)
   {
      _clientID = clientID;
   }
   
   public void setRecommend(boolean recommend)
   {
      _recommend = recommend;
   }
   
   public void setPrice(float price)
   {
      _price = price;
   }
   
   public String getStockCode()
   {
      return _stockCode;
   }
   
   public int getClientID()
   {
      return _clientID;
   }
   
   public boolean getRecommend()
   {
      return _recommend;
   }
   
   public float getPrice()
   {
      return _price;
   }

    /**
     * @return the id
     */
    public int getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }
    
    public void print()
    {
      System.out.print("Stock: ");
      System.out.print(_stockCode);
      System.out.print(" | Price: ");
      System.out.print(_price);
      if (_recommend)
         System.out.println(" | Recommend: Buy");
      else
         System.out.println(" | Recommend: Sell");
    }
}